home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / kcl / akcl / akcl1615.lha / h / hp800.h < prev    next >
C/C++ Source or Header  |  1992-04-11  |  3KB  |  156 lines

  1. #define HPUX
  2. #define HPUX_SOM
  3. #define HP
  4.   
  5. #include "bsd.h"
  6. #undef RUN_PROCESS
  7. #undef WANT_VALLOC
  8. /* uses sigvector instead of sigvec.   Could alternately
  9.      link with -lbsd */
  10. #define sigvec sigvector  
  11.  
  12. /* does not have getpagesize() */
  13.  
  14. /*
  15. #define SBRK(n) \
  16.   (printf("sbrk(%x)=%x",n,FIXtemp=sbrk(n)),fflush(stdout),FIXtemp)
  17.  
  18. #define BRK(n) \
  19.   (printf("brk(%x)=%x",n,FIXtemp=brk(n)),fflush(stdout),FIXtemp)
  20. */
  21.   
  22. #undef SFASL
  23. #define UNIXFASL "faslhp800.c"
  24.  
  25.   /* since we do brk of the whole thing we use a smaller number */
  26.  
  27. /*
  28. #undef MAXPAGE
  29. #define MAXPAGE 10000
  30. */
  31.  
  32. #define ADDITIONAL_FEATURES \
  33.              ADD_FEATURE("HP9000-800"); \
  34.                       ADD_FEATURE("MC68020"); \
  35.     ADD_FEATURE("HP-UX");
  36.  
  37.  
  38. /*
  39. #define USE_C_EXTENDED_MUL
  40. #define USE_C_EXTENDED_DIV
  41. */
  42.  
  43. #define DATA_BEGIN (char *)N_DATADDR(header)
  44.  
  45. #define RELOC_FILE "rel_hp300.c"
  46.  
  47. #define    IEEEFLOAT
  48.  
  49. #define reloc r_info
  50.  
  51. #define N_RELOFF(hdr) RTEXT_OFFSET(hdr)
  52. #define N_SYMOFF(hdr) LESYM_OFFSET(hdr)
  53. #define N_TXTOFF(hdr) TEXT_OFFSET(hdr)
  54.  
  55. /* #undef cs_check */
  56.  
  57. #undef SET_REAL_MAXPAGE
  58. #define SET_REAL_MAXPAGE real_maxpage = MAXPAGE
  59.  
  60.  
  61. /*
  62. #undef INIT_ALLOC
  63. #define INIT_ALLOC     if (BRK(pagetochar(MAXPAGE)) < 0) \
  64.         error("Can't allocate.  Good-bye!.");
  65. */
  66.  
  67. #define HAVE_AOUT
  68. #define exec header
  69. #define SEEK_TO_END_OFILE(fp) \
  70.   do{struct header hdr; \
  71.      fseek(fp,0,0); \
  72.      fread(&hdr, sizeof(hdr), 1, fp); \
  73.      fseek(fp,hdr.som_length,0); \
  74.      }while(0)
  75.  
  76. /* have the getcwd command */
  77.  
  78. #define GETCWD
  79.  
  80. /* note gabor used the att ldirectory... maybe bsd is ok?? */
  81.  
  82. #undef LD_COMMAND
  83.  
  84. #define LD_COMMAND(command,main,start,input,ldarg,output) \
  85.    { char buf[50];  int i; \
  86.      char *b = &buf[sizeof(buf)]; \
  87.      char *pp=input; \
  88.      *--b = 0; \
  89.      for(i=strlen(pp)-3; i >= 0 ; i--) \
  90.        if (pp[i]!='/') { *(--b) = pp[i];} \
  91.           else break; \
  92.   sprintf(command,\
  93.      " if ld -d -a archive -s -e init_code -A %s -R %x -D0x%x %s %s -o %s /lib/dyncall.o ; then true; \
  94.       else ld -d -a archive -s -e init_%s -A %s -R %x -D0x%x %s %s -o %s /lib/dyncall.o ;fi", \
  95.        main,start,start + data_off, input,ldarg,output, \
  96.        b, \
  97.        main,start,start + data_off, input,ldarg,output);}
  98.  
  99. /*  This is ok but does not do the init_filename case 
  100. #define LD_COMMAND(command,main,start,input,ldarg,output) \
  101.   sprintf(command,\
  102.       "ld -d -a archive -s -e init_code -A %s -R %x -D0x%x %s %s -o %s", \
  103.        main,start,start + data_off, input,ldarg,output)
  104. */
  105.  
  106.  
  107.  
  108. /*
  109. #define    SIGNED_CHAR  
  110. #define    REGISTER_VAR
  111. #define    BYTE_ADDRESS
  112. #define    CORE_STARTS_NEAR_0
  113. #undef    DOWN_STACK
  114. #undef    REVERSE_PARAMETER_ORDER
  115. #undef    CC_OPTIMIZES_TEST  
  116. #define    UNIX
  117. #undef    BSD
  118. #define    HPUX
  119. #undef    ATT
  120. #define    ALLOCATE_INCREMENTALLY
  121. #define    ALLOW_FORK
  122.  
  123. */
  124.  
  125.  
  126. /* use #include <fcntl.h> */
  127.  
  128. #define HAVE_FCNTL
  129.  
  130. #define RSYM_AUX "../c/rel_hp300.c"
  131.  
  132.  
  133. #define FIX_BSS     sym->n_type = N_BSS; \
  134.            val = (val + 3) & ~3;
  135.  
  136.  
  137.  
  138. /* Begin for cmpinclude */
  139.  
  140.  
  141. /* End for cmpinclude */
  142.  
  143.  
  144. #define MUST_COPY_VA_LIST
  145.  
  146. /* For listen LISTEN_FOR_INPUT in stdio.h */
  147. #define _file __fileL
  148. #define _cnt __cnt
  149.  
  150. #define DBEGIN 0x40000000   
  151. /* #define DBEGIN 0x800000 */
  152.  
  153.  
  154. #define UNIXSAVE "unexhp9k800.c"
  155.  
  156.